import { useJwt } from "@vueuse/integrations/useJwt";

export async function useFetchEncap<T>(event: T) {
  const encodedJwt = ref(
    "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwiaWF0IjoxNTE2MjM5MDIyfQ.L8i6g3PfcHlioHCCPURC9pmXT7gdJpx3kOoyAfNUwCc",
  );
  const { header, payload } = useJwt(encodedJwt);

  return { header, payload };
}
